<div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="titlepage">
                        <h2>搜索店铺</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="brand-bg">
            <div class="container">
				<div class="search-item-shop col-md-12">
					<form>
						<input class="search" type="text" name="" placeholder="搜素店铺"/>
						<button id="search-shop" class="search-button" type="button">搜索店铺</button>
					</form>
				</div>
				<div class="row cat-shops">

				</div>
            </div>
        </div>
<script type="text/javascript" src="js/ry/item.js"></script>
<script type="text/javascript">
	$(function (){
	    let url = `/ruoyi/search/getshops`;
		doGetShops(url);
        doClickSearchShops();
	});
	function doGetShops(url){
		$.ajax({
			url:url,
			dataType:"json",
			success(result){
				if (result.status===200){
					doLoadShops(result.data);
					doClickShops();
				}
			}
		});
	}
	function doLoadShops(shops){
		for (let i in shops) {
			$(".cat-shops").append(doCreateShops(shops[i]));
		}
	}
	function doCreateShops(shop){
		return `<div class="col-xl-3 col-lg-3 col-md-3 col-sm-6 margin">
					<div class="shop-box">
						<p class="hidden-val">${shop.shopId}</p>
						<img src="${shop.logo}">
						<div class="shop-name">
							<p>${shop.shopName}</p>
						</div>
					</div>
				</div>`;
	}
</script>